package com.zige.zige.activity;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.zige.zige.R;
import com.zige.zige.utils.SystemUtils;

/**
 * Created by Fei on 2015/11/5.
 */
public class AboutLittlezebraActivity extends BaseActivity implements View.OnClickListener{

    private TextView tv_titlet,tv_viersion;
    private Activity activity;
    private RelativeLayout lay_agreement,lay_update;
    private LinearLayout lay_back;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_aboutlittlezebra);
        activity = this;
        initView();

    }
    private void initView(){
        lay_back =serchViewById(R.id.lay_back);
        lay_back.setOnClickListener(this);
        tv_titlet= serchViewById(R.id.title_name);
        tv_titlet.setText("关于VR小伴马");
        tv_viersion = serchViewById(R.id.tv_version);
        tv_viersion.setText("V"+ SystemUtils.getVersionName(activity).trim());
        lay_agreement  = serchViewById(R.id.lay_agreement);
        lay_agreement.setOnClickListener(this);
        lay_update = serchViewById(R.id.lay_update);
        lay_update.setOnClickListener(this);

    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.lay_agreement:
               startActivity(new Intent(AboutLittlezebraActivity.this,UserAgreementActivity.class));
                break;
            case R.id.lay_back:
                finish();
                break;
            case R.id.lay_update:

                break;

        }
    }

}
